package com.heima.utils.thread;

import com.heima.model.common.wemedia.pojos.WmUser;
import org.omg.CORBA.PUBLIC_MEMBER;

public class WmThreadLOcalUtils {
    private static final ThreadLocal<WmUser>WM_USER_THREAD_LOCAL=new ThreadLocal<>();
//存入线程中
    public static void setUser(WmUser wmUser){
        WM_USER_THREAD_LOCAL.set(wmUser);
    }
    //获取线程
    public static WmUser getUser(){
        return WM_USER_THREAD_LOCAL.get();
    }
    //清理线程
    public static void clear(){
        WM_USER_THREAD_LOCAL.remove();
    }
}
